import {createRouter,createWebHistory} from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import TestPinia from '../views/test/TestPinia.vue'
import CheckPassword from '../views/password/CheckPassword.vue'
import ErrorCheck from '../views/password/ErrorCheck.vue'
import UpdatePassword from '../views/password/UpdatePassword.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes:[
        {
            path: "/",
            name:"home",
            component: Home
        },{
            path: "/login",
            name:"login",
            component: Login
        },{
            path: "/test",
            name: "test",
            children:[
                {
                    path: 'pinia',
                    name: 'testpinia',
                    component: TestPinia
                }
            ]
        },{
            path: "/password",
            name: "password",
            children:[
                {
                    path: 'check',
                    name: 'password_check',
                    component: CheckPassword
                },
                {
                    path: 'update',
                    name: 'password_update',
                    component: UpdatePassword
                },
                {
                    path: 'error',
                    name: 'password_error',
                    component: ErrorCheck
                }
            ]

        }
    ]
})
export default router;